package com.example.testspringes.json;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import org.apache.commons.lang3.time.DateUtils;

import java.io.IOException;

/**
 * @Description: //TODO
 * @ProjectName: testspringes
 * @Package: com.example.testspringes.json
 * @Author: FX
 * @CreateDate: 2019/1/15 13:46
 * @Version: 1.0
 * Copyright: Copyright (c) 2019
 */
public class TestJson extends JsonSerializer<String> {

    @Override
    public void serialize(String s, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
        System.out.println(s);
        jsonGenerator.writeString("b");

    }
}
